x <- matrix( rnorm(10000 * 200), ncol = 200 )
m <- colMeans(x)
s <- cov(x)
system.time( mahala(x, m, s) )
system.time( mahalanobis(x, m, s) )
a1 <- mahalanobis(x, m, s)
a2 <- mahala(x, m, s)
all.equal(a1, a2)
Run the code above in your browser using DataLab